<!DOCTYPE html>
<html>
  <head>
    <meta charset='utf-8'>
    <meta content='width=device-width, initial-scale=1.0' name='viewport'>
    <meta content='' name='description'>
    <meta content='Nils Nordman' name='author'>
    <link href='/images/howl.png' rel='shortcut icon'>
    <title>Howl :: Spec - howl.ui.style</title>
    <link href="/stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/syntax.css" media="screen" rel="stylesheet" type="text/css" />
    <link href="/stylesheets/howl.css" media="screen" rel="stylesheet" type="text/css" />
    <link href='//fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css'>
    <link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700' rel='stylesheet' type='text/css'>
  </head>
  <body class='doc doc_spec doc_spec_ui doc_spec_ui_style_spec'>
    <div class='container'>
      <div class='masthead'>
        <ul class='nav nav-pills'>
          <li>
            <a href='/'>
              <span class='glyphicon glyphicon-home'></span>
              Home
            </a>
          </li>
          <li>
            <a href='/doc/'>
              <span class='glyphicon glyphicon-book'></span>
              Documentation
            </a>
          </li>
          <li>
            <a href='/blog/'>
              <span class='glyphicon glyphicon-bullhorn'></span>
              Blog
            </a>
          </li>
          <li>
            <a href='/contact.html'>
              <span class='glyphicon glyphicon-inbox'></span>
              Contact
            </a>
          </li>
        </ul>
      </div>
      <ol class="breadcrumb"><li><a href="/">Home</a></li><li><a href='../../'>Howl 0.3 Documentation</a></li><li>Spec</li><li>Ui</li><li>Spec - howl.ui.style</li></ol>
      <div class="spec-group spec-group-1">&#x000A;&#x000A;<h1 id="howl.ui.style">howl.ui.style</h1>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="kd">local</span><span class="w"> </span><span class="n">sci</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;&#x000A;</span><span class="n">before_each</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">&#x000A;    </span><span class="n">sci</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Scintilla</span><span class="o">!</span><span class="w">&#x000A;    </span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Buffer</span><span class="w"> </span><span class="p">{},</span><span class="w"> </span><span class="n">sci</span><span class="w">&#x000A;    </span><span class="n">style</span><span class="p">.</span><span class="n">register_sci</span><span class="w"> </span><span class="n">sci</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="styles-can-be-accessed-using-direct-indexing">styles can be accessed using direct indexing</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">styles:</span><span class="w"> </span><span class="ss">default:</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#998877'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">set_for_theme</span><span class="w"> </span><span class="n">t</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">default</span><span class="p">.</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">styles</span><span class="p">.</span><span class="n">default</span><span class="p">.</span><span class="n">color</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id=".name_for(number,-buffer,-sci)-returns-the-style-name-for-number">.name_for(number, buffer, sci) returns the style name for number</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">name_for</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="p">{}),</span><span class="w"> </span><span class="s1">'keyword'</span><span class="w"> </span><span class="c1">-- default keyword number</span><span class="w">&#x000A;&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'whats_in_a_name'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'whats_in_a_name'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">name_for</span><span class="p">(</span><span class="n">style_num</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">),</span><span class="w"> </span><span class="s1">'whats_in_a_name'</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id=".set_for_buffer(sci,-buffer)-initializes-any-previously-used-buffer-styles">.set_for_buffer(sci, buffer) initializes any previously used buffer styles</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">sci2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Scintilla</span><span class="o">!</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">register_sci</span><span class="w"> </span><span class="n">sci2</span><span class="w">&#x000A;&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'style_foo'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">prev_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'style_foo'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">set_for_buffer</span><span class="w"> </span><span class="n">sci2</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;&#x000A;</span><span class="n">defined_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci2</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">prev_number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">defined_fore</span><span class="p">,</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;&#x000A;</span><span class="n">new_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'style_foo'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">new_number</span><span class="p">,</span><span class="w"> </span><span class="n">prev_number</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id=".at_pos(buffer,-pos)-returns-name-and-style-definition-at-pos">.at_pos(buffer, pos) returns name and style definition at pos</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'stylish'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#101010'</span><span class="w">&#x000A;</span><span class="n">buffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">ActionBuffer</span><span class="o">!</span><span class="w">&#x000A;</span><span class="n">buffer</span><span class="o">\</span><span class="n">insert</span><span class="w"> </span><span class="s1">'hƏllo'</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s1">'keyword'</span><span class="w">&#x000A;</span><span class="n">buffer</span><span class="o">\</span><span class="n">insert</span><span class="w"> </span><span class="s1">'Bačon'</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="s1">'stylish'</span><span class="w">&#x000A;&#x000A;</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">at_pos</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">)</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s1">'keyword'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">same</span><span class="w"> </span><span class="n">def</span><span class="p">,</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">keyword</span><span class="w">&#x000A;&#x000A;</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">def</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">at_pos</span><span class="p">(</span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">)</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="s1">'stylish'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">same</span><span class="w"> </span><span class="n">def</span><span class="p">,</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">stylish</span></code></pre>&#x000A;&#x000A;<div class="spec-group spec-group-2">&#x000A;&#x000A;<h2 id=".define">.define<span class="arg-list">(name, definition)</span></h2>&#x000A;&#x000A;<h4 id="allows-defining-custom-styles">allows defining custom styles</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">custom</span><span class="p">.</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="s1">'#334455'</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="automatically-redefines-the-style-in-any-existing-sci">automatically redefines the style in any existing sci</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'keyword'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;&#x000A;</span><span class="n">custom_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">keyword_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'keyword'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'keyword'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#665544'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#776655'</span><span class="w">&#x000A;&#x000A;</span><span class="n">keyword_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">keyword_number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#665544'</span><span class="p">,</span><span class="w"> </span><span class="n">keyword_fore</span><span class="w">&#x000A;&#x000A;</span><span class="n">custom_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">custom_number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#776655'</span><span class="p">,</span><span class="w"> </span><span class="n">custom_fore</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="allows-specifying-font-size-for-a-style-as-an-offset-spec-from-&quot;font_size&quot;">allows specifying font size for a style as an offset spec from &quot;font_size&quot;</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'larger_style'</span><span class="p">,</span><span class="w"> </span><span class="ss">font:</span><span class="w"> </span><span class="ss">size:</span><span class="w"> </span><span class="s1">'larger'</span><span class="w">&#x000A;</span><span class="n">style_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'larger_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">font_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_size</span><span class="w"> </span><span class="n">style_number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_true</span><span class="w"> </span><span class="n">font_size</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="n">config</span><span class="p">.</span><span class="n">font_size</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="allows-aliasing-styles-using-a-string-as-&lt;definition&gt;">allows aliasing styles using a string as &lt;definition&gt;</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'target'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#beefed'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'alias'</span><span class="p">,</span><span class="w"> </span><span class="s1">'target'</span><span class="w">&#x000A;</span><span class="n">style_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'alias'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#beefed'</span><span class="p">,</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style_number</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="the-actual-style-used-is-based-upon-the-effective-default-style">the actual style used is based upon the effective default style</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'default'</span><span class="p">,</span><span class="w"> </span><span class="ss">background:</span><span class="w"> </span><span class="s1">'#112233'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'other_default'</span><span class="p">,</span><span class="w"> </span><span class="ss">background:</span><span class="w"> </span><span class="s1">'#111111'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#beefed'</span><span class="w">&#x000A;&#x000A;</span><span class="n">sci2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Scintilla</span><span class="o">!</span><span class="w">&#x000A;</span><span class="n">buffer2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Buffer</span><span class="w"> </span><span class="p">{},</span><span class="w"> </span><span class="n">sci2</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">register_sci</span><span class="w"> </span><span class="n">sci2</span><span class="p">,</span><span class="w"> </span><span class="s1">'other_default'</span><span class="w">&#x000A;&#x000A;</span><span class="n">style_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#112233'</span><span class="p">,</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">style_number</span><span class="w">&#x000A;&#x000A;</span><span class="n">style_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'custom'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer2</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#111111'</span><span class="p">,</span><span class="w"> </span><span class="n">sci2</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">style_number</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="redefining-a-default-style-causes-other-styles-to-be-rebased-upon-that">redefining a default style causes other styles to be rebased upon that</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'own_style'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;&#x000A;</span><span class="n">custom_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'own_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">default_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'default'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'default'</span><span class="p">,</span><span class="w"> </span><span class="ss">background:</span><span class="w"> </span><span class="s1">'#998877'</span><span class="w">&#x000A;&#x000A;</span><span class="n">custom_back</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">custom_number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#998877'</span><span class="p">,</span><span class="w"> </span><span class="n">custom_back</span><span class="w">&#x000A;&#x000A;</span><span class="n">custom_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">custom_number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#334455'</span><span class="p">,</span><span class="w"> </span><span class="n">custom_fore</span></code></pre>&#x000A;&#x000A;</div>&#x000A;<div class="spec-group spec-group-2">&#x000A;&#x000A;<h2 id="define_default">define_default<span class="arg-list">(name, definition)</span></h2>&#x000A;&#x000A;<h4 id="defines-the-style-only-if-it-is-not-already-defined">defines the style only if it is not already defined</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define_default</span><span class="w"> </span><span class="s1">'preset'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">preset</span><span class="p">.</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define_default</span><span class="w"> </span><span class="s1">'preset'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#667788'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">preset</span><span class="p">.</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="s1">'#334455'</span></code></pre>&#x000A;&#x000A;</div>&#x000A;<div class="spec-group spec-group-2">&#x000A;&#x000A;<h2 id=".number_for">.number_for<span class="arg-list">(name, buffer [, base])</span></h2>&#x000A;&#x000A;<h4 id="returns-the-assigned-style-number-for-name-in-sci">returns the assigned style number for name in sci</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="p">(</span><span class="s1">'keyword'</span><span class="p">),</span><span class="w"> </span><span class="mi">5</span><span class="w"> </span><span class="c1">-- default keyword number</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="automatically-assigns-a-style-number-and-defines-the-style-in-scis-if-necessary">automatically assigns a style number and defines the style in scis if necessary</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_style_a'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_style_b'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_style_a'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">set_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">set_fore</span><span class="p">,</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_not</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="p">(</span><span class="s1">'my_style_b'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">),</span><span class="w"> </span><span class="n">style_num</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="remembers-the-style-number-used-for-a-particular-style">remembers the style number used for a particular style</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'got_it'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'got_it'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">style_num2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'got_it'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style_num2</span><span class="p">,</span><span class="w"> </span><span class="n">style_num</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="raises-an-error-if-the-number-of-styles-are-#exhausted">raises an error if the number of styles are #exhausted</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="k">for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">255</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_style'</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">raises</span><span class="w"> </span><span class="s1">'Out of style number'</span><span class="p">,</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">&#x000A;  </span><span class="k">for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">255</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_style'</span><span class="w"> </span><span class="o">..</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="returns-the-default-style-number-if-the-style-is-not-defined">returns the default style number if the style is not defined</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="p">(</span><span class="s1">'foo'</span><span class="p">,</span><span class="w"> </span><span class="p">{}),</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="p">(</span><span class="s1">'default'</span><span class="p">,</span><span class="w"> </span><span class="p">{})</span></code></pre>&#x000A;&#x000A;</div>&#x000A;<div class="spec-group spec-group-2">&#x000A;&#x000A;<h2 id=".register_sci">.register_sci<span class="arg-list">(sci, default_style)</span></h2>&#x000A;&#x000A;<h4 id="defines-the-default-styles-in-the-specified-sci">defines the default styles in the specified sci</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">theme</span><span class="p">.</span><span class="n">current</span><span class="w">&#x000A;</span><span class="n">t</span><span class="p">.</span><span class="n">styles</span><span class="p">.</span><span class="n">keyword</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#112233'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">set_for_theme</span><span class="w"> </span><span class="n">t</span><span class="w">&#x000A;&#x000A;</span><span class="n">sci2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Scintilla</span><span class="o">!</span><span class="w">&#x000A;</span><span class="n">buffer2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Buffer</span><span class="w"> </span><span class="p">{},</span><span class="w"> </span><span class="n">sci2</span><span class="w">&#x000A;&#x000A;</span><span class="n">number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'keyword'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer2</span><span class="w">&#x000A;</span><span class="n">old</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci2</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">number</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">register_sci</span><span class="w"> </span><span class="n">sci2</span><span class="w">&#x000A;</span><span class="n">new</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci2</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">number</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_not</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">new</span><span class="p">,</span><span class="w"> </span><span class="n">old</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">new</span><span class="p">,</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">styles</span><span class="p">.</span><span class="n">keyword</span><span class="p">.</span><span class="n">color</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="allows-specifying-a-different-default-style-through-&lt;default_style&gt;">allows specifying a different default style through &lt;default_style&gt;</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">t</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">theme</span><span class="p">.</span><span class="n">current</span><span class="w">&#x000A;</span><span class="n">t</span><span class="p">.</span><span class="n">styles</span><span class="p">.</span><span class="n">keyword</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#223344'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">set_for_theme</span><span class="w"> </span><span class="n">t</span><span class="w">&#x000A;&#x000A;</span><span class="n">sci2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Scintilla</span><span class="o">!</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">register_sci</span><span class="w"> </span><span class="n">sci2</span><span class="p">,</span><span class="w"> </span><span class="s1">'keyword'</span><span class="w">&#x000A;</span><span class="n">def_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci2</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'default'</span><span class="p">,</span><span class="w"> </span><span class="p">{}</span><span class="w">&#x000A;</span><span class="n">def_kfore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci2</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'keyword'</span><span class="p">,</span><span class="w"> </span><span class="p">{}</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">t</span><span class="p">.</span><span class="n">styles</span><span class="p">.</span><span class="n">keyword</span><span class="p">.</span><span class="n">color</span><span class="p">,</span><span class="w"> </span><span class="n">def_fore</span></code></pre>&#x000A;&#x000A;</div>&#x000A;<div class="spec-group spec-group-2">&#x000A;&#x000A;<h3 id=""><span class="arg-list">(extended styles)</span></h3>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">before_each</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">&#x000A;  </span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_base'</span><span class="p">,</span><span class="w"> </span><span class="ss">background:</span><span class="w"> </span><span class="s1">'#112233'</span><span class="w">&#x000A;  </span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_style'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#334455'</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="redefining-a-default-style-also-rebases-extended-styles">redefining a default style also rebases extended styles</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s1">'my_base'</span><span class="w">&#x000A;&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_false</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_bold</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'default'</span><span class="p">,</span><span class="w"> </span><span class="ss">font:</span><span class="w"> </span><span class="ss">bold:</span><span class="w"> </span><span class="kc">true</span><span class="w">&#x000A;&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_true</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_bold</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#112233'</span><span class="p">,</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">style_num</span></code></pre>&#x000A;&#x000A;<div class="spec-group spec-group-3">&#x000A;&#x000A;<h3 id=".number_for">.number_for<span class="arg-list">(name, buffer, base)</span></h3>&#x000A;<div class="spec-group spec-group-4">&#x000A;&#x000A;<h3 id=""><span class="arg-list">(when base is specified)</span></h3>&#x000A;&#x000A;<h4 id="automatically-defines-an-extended-style-based-upon-the-base-and-specified-style">automatically defines an extended style based upon the base and specified style</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s1">'my_base'</span><span class="w">&#x000A;</span><span class="n">set_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">set_back</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">set_fore</span><span class="p">,</span><span class="w"> </span><span class="s1">'#334455'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">set_back</span><span class="p">,</span><span class="w"> </span><span class="s1">'#112233'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_not_nil</span><span class="w"> </span><span class="n">style</span><span class="p">[</span><span class="s1">'my_base:my_style'</span><span class="p">]</span></code></pre>&#x000A;&#x000A;&#x000A;<h4 id="returns-the-base-style-if-the-specified-style-is-not-found">returns the base style if the specified style is not found</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_unknown_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s1">'my_base'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="p">(</span><span class="s1">'my_base'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">),</span><span class="w"> </span><span class="n">style_num</span></code></pre>&#x000A;&#x000A;<div class="spec-group spec-group-5">&#x000A;&#x000A;<h3 id=""><span class="arg-list">(..  when &lt;name&gt; itself specifies an extended style)</span></h3>&#x000A;&#x000A;<h4 id="extracts-the-base-automatically">extracts the base automatically</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_other_base'</span><span class="p">,</span><span class="w"> </span><span class="ss">background:</span><span class="w"> </span><span class="s1">'#112244'</span><span class="w">&#x000A;</span><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_other_base:my_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="w">&#x000A;</span><span class="n">set_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">set_back</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#334455'</span><span class="p">,</span><span class="w"> </span><span class="n">set_fore</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#112244'</span><span class="p">,</span><span class="w"> </span><span class="n">set_back</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">is_not_nil</span><span class="w"> </span><span class="n">style</span><span class="p">[</span><span class="s1">'my_other_base:my_style'</span><span class="p">]</span></code></pre>&#x000A;&#x000A;</div>&#x000A;</div>&#x000A;</div>&#x000A;<div class="spec-group spec-group-3">&#x000A;&#x000A;<h3 id=""><span class="arg-list">(..  when one of composing styles is redefined)</span></h3>&#x000A;&#x000A;<h4 id="updates-the-extended-style-definition">updates the extended style definition</h4>&#x000A;&#x000A;<pre class="highlight moonscript"><code><span class="n">style_num</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">style</span><span class="p">.</span><span class="n">number_for</span><span class="w"> </span><span class="s1">'my_style'</span><span class="p">,</span><span class="w"> </span><span class="n">buffer</span><span class="p">,</span><span class="w"> </span><span class="s1">'my_base'</span><span class="w">&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_base'</span><span class="p">,</span><span class="w"> </span><span class="ss">background:</span><span class="w"> </span><span class="s1">'#222222'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#222222'</span><span class="p">,</span><span class="w"> </span><span class="n">style</span><span class="p">[</span><span class="s1">'my_base:my_style'</span><span class="p">].</span><span class="n">background</span><span class="w">&#x000A;&#x000A;</span><span class="n">style</span><span class="p">.</span><span class="n">define</span><span class="w"> </span><span class="s1">'my_style'</span><span class="p">,</span><span class="w"> </span><span class="ss">color:</span><span class="w"> </span><span class="s1">'#222222'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="s1">'#222222'</span><span class="p">,</span><span class="w"> </span><span class="n">style</span><span class="p">[</span><span class="s1">'my_base:my_style'</span><span class="p">].</span><span class="n">color</span><span class="w">&#x000A;&#x000A;</span><span class="n">set_fore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_fore</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">set_back</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sci</span><span class="o">\</span><span class="n">style_get_back</span><span class="w"> </span><span class="n">style_num</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">set_fore</span><span class="p">,</span><span class="w"> </span><span class="s1">'#222222'</span><span class="w">&#x000A;</span><span class="n">assert</span><span class="p">.</span><span class="n">equal</span><span class="w"> </span><span class="n">set_back</span><span class="p">,</span><span class="w"> </span><span class="s1">'#222222'</span></code></pre>&#x000A;&#x000A;</div>&#x000A;</div>&#x000A;</div>
      <div class='footer text-muted'>
        <a href='/'>
          <img width="50" height="50" class="footer-logo" src="/images/howl.png" />
        </a>
        <div class='footer-follow'>
          <p>
            <a class='twitter-follow-button' data-lang='en' data-show-count='false' href='https://twitter.com/howleditor' rel='me'>
              Follow @howleditor
            </a>
          </p>
          <p>
            <a class='twitter-share-button' data-count='none' data-hashtags='howleditor' data-lang='en' data-text='The Howl Editor, a general purpose, light-weight customizable editor.' data-url='http://howl.io' href='https://twitter.com/share'>
              Tweet
            </a>
          </p>
        </div>
        <div class='footer-blurb'>
          <div>The Howl editor.</div>
          <div>
            Copyright 2012-2015
            <a class='alert-link' href='https://github.com/nilnor/howl/contributors'>
              The Howl Developers.
            </a>
          </div>
        </div>
      </div>
    </div>
    <script>
      <!-- / GA -->
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', 'UA-45283282-1', 'howl.io');
      ga('send', 'pageview');
      <!-- / Twitter -->
      !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
      if(!d.getElementById(id)){js=d.createElement(s);js.id=id;
      js.src="//platform.twitter.com/widgets.js";
      fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
    </script>
  </body>
</html>
